#ifndef __KWS_SPOT_H__
#define __KWS_SPOT_H__

#include "math.h"
#include "mfcc.h"
#include "nnom.h"

//31.25ms * 16000hz = 512, // FFT (windows size must be 2 power n)
#define AUDIO_FRAME_LEN (512)

//the mfcc feature for kws
#define MFCC_LEN            (62)
#define MFCC_COEFFS_FIRST   (1)		// ignore the mfcc feature before this number
#define MFCC_COEFFS_LEN     (13)    // the total coefficient to calculate
#define MFCC_TOTAL_NUM_BANK (26)	// total number of filter bands
#define MFCC_COEFFS         (MFCC_COEFFS_LEN-MFCC_COEFFS_FIRST)//13-1=12

#define MFCC_FEAT_SIZE  (MFCC_LEN * MFCC_COEFFS)//image:(62, 12, 1)

void keyword_spot_create_model(void);
int keyword_spot_pro(short *in_dat, uint32_t *label_t, float *prob_t);
void keyword_spot_delete_model(void);
#endif
